﻿@model IPollEditor

<dt>Poll</dt>

<dd>
    @if (Model.EditorType == EditorType.Edit)
    {
        if (Model.PollEditor != null && Model.PollEditor.HasVotes)
        {
            <label>This poll can't be edited because votes have already been cast.</label>
            <label>To create a new poll, check the checkbox below and enter the new poll information.</label>
            <br />
            @Html.CheckBoxFor(model => model.PollEditor.Delete)
            @Html.LabelFor(model => model.PollEditor.Delete, "Delete poll and votes")
            @Html.HiddenFor(model => model.PollEditor.PollID)
        }
    }
    <br />
    <label>Question</label>
    <br />
    @Html.TextBoxFor(model => model.PollEditor.Text)
    <br />
    <label>Options (Place each option on a new line)</label>
    <br />
    @Html.TextAreaFor(model => model.PollEditor.Options, new { style = "width:200px;height: 100px", @class = "normal" })
    <br />
    @Html.ValidationMessageFor(model => model.PollEditor.Options) 
</dd>